<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s"  uri="/struts-tags"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <meta content="text/html; charset=UTF-8" http-equiv="content-type" />
    <title>网站标题</title>
    <meta name="keywords" content="keyword ..." />
    <meta name="Description" content="description ..." />
    <!--<link href="favicon.ico" rel="shortcut icon" />-->
    <link href="css/global.css" rel="stylesheet" type="text/css" />
    <link href="css/detail.css" rel="stylesheet" type="text/css" />
</head>
<s:if test="#request.feedbackMsg!=null" >
<body onload="alert('<s:property value="#request.feedbackMsg" />')" >
</s:if>
<s:else>
<body>
</s:else>
<div id="header">
	<jsp:include page="include/header.jsp" />
</div>
<div id="maincontent">  
  <div id="bottomcontent">    
    <div id="leftcontent">
     <div id="detailcontent">
       <div class="image"><img src="<s:property value="#request.giftDetail.pic" />" alt="" title="" /></div>
       <div class="info">
         <h4><s:property value="#request.giftDetail.name" /></h4>
         <ul>
           <li>
           <div class="sharecontent">分享得积分<a href="#"><img src="pic/share03.jpg" alt="" title="" /></a><a href="#"><img src="pic/share01.jpg" alt="" title="" /></a><a href="#"><img src="pic/share03.jpg" alt="" title="" /></a></div>
           <label>微商城积分</label>：<b class="b"><s:property value="#request.giftDetail.point" /></b></li>
           <li><label>配送运费</label>：<strong>包邮</strong></li>
           <li><label>已兑换</label>：<b><s:property value="#request.giftDetail.amount" /></b>件</li>
           <li class="li"><label>选择款式</label>：
           <div id="typelist">
             <ul>
               <li class="current">喜<!--库存--><span class="none">1000</span></li>
               <li>怒<!--库存--><span class="none">1001</span></li>
               <li>哀<!--库存--><span class="none">1002</span></li>
               <li>乐<!--库存--><span class="none">1003</span></li>
             </ul>
           </div>           
           </li>
           
           <li><label>我要兑换</label>：<input name="exchangeGiftDetail.num" type="text" class="text" value="1" />件（库存<span id="productnum"><s:property value="#request.giftDetail.stocks" /></span>件）</li>
           <li class="btnli">
           <!-- 马上兑换 -->
           <form action="addandsettle" method="post" style="display: inline;">
           <input type="hidden" name="exchangeGiftDetail.id" value="<s:property value="#request.giftDetail.id" />" />
           <input type="hidden" name="exchangeGiftDetail.name" value="<s:property value="#request.giftDetail.name" />" />
           <input type="hidden" name="exchangeGiftDetail.pic" value="<s:property value="#request.giftDetail.pic" />" />
           <input type="hidden" name="exchangeGiftDetail.point" value="<s:property value="#request.giftDetail.point" />" />
           <input type="hidden" name="exchangeGiftDetail.stocks" value="<s:property value="#request.giftDetail.stocks" />" />
           <input type="hidden" name="exchangeGiftDetail.num" value="" />
           <input type="submit" class="btn btn1" value="" />
           </form>
           <!-- 加入兑换车 -->
           <form action="addtoshoppinglist" method="post" style="display: inline;">
           <input type="hidden" name="exchangeGiftDetail.id" value="<s:property value="#request.giftDetail.id" />" />
           <input type="hidden" name="exchangeGiftDetail.name" value="<s:property value="#request.giftDetail.name" />" />
           <input type="hidden" name="exchangeGiftDetail.pic" value="<s:property value="#request.giftDetail.pic" />" />
           <input type="hidden" name="exchangeGiftDetail.point" value="<s:property value="#request.giftDetail.point" />" />
           <input type="hidden" name="exchangeGiftDetail.stocks" value="<s:property value="#request.giftDetail.stocks" />" />
           <input type="hidden" name="exchangeGiftDetail.num" value="" />
           <input type="submit" class="btn btn2" value="" />
           </form>
           <input type="button" class="btn btn3" />
           
           
           </li>
         </ul>
       </div>
       <div class="clear"></div>
     </div>
      <div id="tabcontent">
        <div class="tabs">
          <ul>
            <li tabindex="1" class="current">礼品详情</li>
            <li tabindex="2">兑换记录</li>
          </ul>
        </div>
        <div class="bodycontent bodycontent1">
          <div class="img"><img src="<s:property value="#request.giftDetail.pic" />" alt="" title="" /></div>
          <font><s:property value="#request.giftDetail.profile" /></font>
        </div>
        <div class="bodycontent bodycontent2 none">
        <ul class="list">
          <li class="t"><span class="s1">用户</span><span class="s2">礼品名称</span><span class="s3">兑换数量</span><span class="s4">积分</span><span class="s5">兑换时间</span><span class="s6">状态</span></li>
          <s:iterator value="#request.giftDetailExchanges">
          <li>
          <span class="s1"><a href="<s:property value="userId" />"><s:property value="userName" /></a></span>
          <span class="s2"><a href="giftdetail?giftId=<s:property value="giftId" />"><s:property value="giftName" /></a></span>
          <span class="s3"><s:property value="count" /></span>
          <span class="s4"><s:property value="point" /></span>
          <span class="s5"><s:date name="time" format="yyyy-MM-dd HH:mm:ss"/></span>
          <span class="s6">
          <s:if test="status==1">已发货</s:if>
          <s:else>未发货</s:else>
          </span>
          </li>
          </s:iterator>
        </ul>
        <form method="get" action="giftdetail" >
     <div class="page">
     共<font color="#FF0000"> <s:property value="pageInfo.pageAmount" /> </font>页
     &nbsp;
     <font color="#FF0000"><s:property value="pageInfo.amount" /></font>条记录&nbsp;&nbsp;
     <s:if test="pageInfo.currentPage==1">
								<a>
							</s:if>
							<s:else>
								<a
									href="giftdetail?giftId=<s:property value="giftId" />&pageInfo.currentPage=<s:property value="pageInfo.currentPage-1" />
									&pageInfo.lineSize=<s:property value="pageInfo.lineSize" />">
							</s:else>上一页</a>
     <s:if test="pageInfo.currentPage>1">
								<a
									href="giftdetail?giftId=<s:property value="giftId" />&pageInfo.currentPage=<s:property value="pageInfo.currentPage-1" />&pageInfo.lineSize=<s:property value="pageInfo.lineSize" />">
									<s:property
										value="pageInfo.currentPage-1" /></a></s:if>

							<a class="hover"><s:property value="pageInfo.currentPage" /></a>
							
							<s:if test="pageInfo.currentPage<=pageInfo.pageAmount-1">
								<a
									href="giftdetail?giftId=<s:property value="giftId" />&pageInfo.currentPage=<s:property value="pageInfo.currentPage+1" />&pageInfo.lineSize=<s:property value="pageInfo.lineSize" />">
									<s:property
										value="pageInfo.currentPage+1" /></a></s:if>
							<s:if test="pageInfo.currentPage<=pageInfo.pageAmount-2">
								<a
									href="giftdetail?giftId=<s:property value="giftId" />&pageInfo.currentPage=<s:property value="pageInfo.currentPage+2" />&pageInfo.lineSize=<s:property value="pageInfo.lineSize" />">
									<s:property
										value="pageInfo.currentPage+2" /></a></s:if>
     <s:if test="pageInfo.currentPage>=pageInfo.pageAmount">
								<a>
							</s:if>
							<s:else>
								<a
									href="giftdetail?giftId=<s:property value="giftId" />&pageInfo.currentPage=<s:property value="pageInfo.currentPage+1" />
									&pageInfo.lineSize=<s:property value="pageInfo.lineSize" />">
							</s:else>
							下一页</a>&nbsp;
							到第
							<input name="pageInfo.currentPage" type="text" class="text" />页
							<input type="hidden" name="pageInfo.lineSize" value="<s:property value="pageInfo.lineSize" />" />
							<input type="hidden" name="giftId" value="<s:property value="giftId" />" />
							<input type="submit" class="btn" value="确认" /></div></form></div>
      </div>
    </div>
    <div id="exchange">      
      <h3><a href="#">热门排行</a></h3>
      <div class="body">
        <div class="tabs">
          <ul>
            <li class="current" tabindex="1">热门微商城兑换</li>
            <li tabindex="2">热门微商家兑换</li>
          </ul>
        </div>
        <div class="bodycontent bodycontent1">
          <ul>
           <s:iterator value="#application.gifts" >
           <li>
             <div class="img"><a href="giftdetail?giftId=<s:property value="id" />"><img src="<s:property value="pic" />" alt="<s:property value="name" />" title="<s:property value="profile" />" /></a></div>
             <div class="info">
               <h4><a href="giftdetail?giftId=<s:property value="id" />"><s:property value="name" /></a></h4>
               <div class="price">￥<span><s:property value="price" />元</span></div>
               <div class="cart">已售出<label><s:property value="amount" /></label>件</div>
             </div>
             <div class="clear"></div>
           </li>
           </s:iterator>
          </ul>
        </div>
        <div class="bodycontent bodycontent2 none">
          <ul>
           <s:iterator value="#application.shopProducts" >
           <li>
             <div class="img"><a href="<s:property value="id" />"><img src="<s:property value="pic" />" alt="<s:property value="name" />" title="<s:property value="profile" />" /></a></div>
             <div class="info">
               <h4><a href="<s:property value="id" />"><s:property value="name" /></a></h4>
               <div class="price">￥<span><s:property value="oldPrice" />元</span></div>
               <div class="cart">已售出<label><s:property value="amount" /></label>件</div>
             </div>
             <div class="clear"></div>
           </li>
           </s:iterator>
          </ul>
        </div>
      </div>
      <div class="search">
        <h3>搜索微商城所有礼品</h3>
        <ul>
          <li><label>关键词：</label><input type="text" class="text" /></li>
          <li><label>&nbsp;&nbsp;价格：</label><input type="text" class="text short" /><span>到</span><input type="text" class="text short" /></li>
          <li class="btnli"><input type="button" class="searchbtn" value="" /></li>
        </ul>
      </div>
    </div> 
    <div class="clear"></div>
  </div>
</div>
<div id="footer">
 <div class="menu"><a href="#">关于微积分</a><span>|</span><a href="#">服务条款</a><span>|</span><a href="#">加盟合作</a><span>|</span><a href="#">广告服务</a><span>|</span><a href="#">客服中心</a><span>|</span><a href="#">意见反馈</a><span>|</span><a href="#">网站导航</a></div>
 <p><span>&copy;</span> 2009-2011 Wjifen.com All Right Reserved 京ICP备09045377号-2</p>
 <p>广州科信德科技发展有限公司 版权所有</p>
</div>
<div id="fullcontent"><div class="fullcontent"></div></div>
<script language="javascript" type="text/javascript" src="js/jquery-1.4.4.min.js"></script>
<script language="javascript" type="text/javascript" src="js/default.js"></script>
</body>
</html>
